package org.csu.mypetstore.service;

import org.csu.mypetstore.domain.Admin;
import org.csu.mypetstore.persistence.AdminDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminService {
    @Autowired
    private AdminDAO adminDAO;

    public Admin getAdmin(String username, String password){
        Admin admin = new Admin();
        admin.setUsername(username);
        admin.setPassword(password);
        return adminDAO.getAdminByUsernameAndPassword(admin);
    }

}
